Skip to contentSkip to conversation

python3: add pydoc and urllib to core

PATCH In review Yu, Mingli 3 participants 8 messages May 18, 2020 – May 19, 2020 1 message not in the archive

lore
Share & tools
lore

Yu, Mingli

author
#0 lore raw

PATCH 1/1 python3: add pydoc and urllib to core

From: Mingli Yu <[email protected]>

Add pydoc and urllib to core to fix below error:

 # python3
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_ import pydoc
ModuleNotFoundError: No module named 'pydoc'
File "/usr/lib64/python3.8/pydoc.py", line 72, in <module> import urllib.parse
ModuleNotFoundError: No module named 'urllib'

---
 .../python/python3/python3-manifest.json      | 24 +++++--------------
 meta/recipes-devtools/python/python3_3.8.2.bb |  3 +--
 2 files changed, 7 insertions(+), 20 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +6 -18
index 3bcc9b8662..808eadb8f6 100644
@@ -203,6 +203,7 @@
             "${bindir}/python${PYTHON_MAJMIN}",
             "${bindir}/python${PYTHON_MAJMIN}.real",
             "${bindir}/python3",
+            "${bindir}/pydoc*",
             "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h",
             "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
             "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
@@ -289,6 +290,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
             "${libdir}/python${PYTHON_MAJMIN}/platform.py",
             "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
             "${libdir}/python${PYTHON_MAJMIN}/re.py",
             "${libdir}/python${PYTHON_MAJMIN}/reprlib.py",
             "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
@@ -313,8 +315,11 @@
             "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
             "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
             "${libdir}/python${PYTHON_MAJMIN}/types.py",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
             "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
             "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data",
             "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]"
         ],
         "cached": [
@@ -363,6 +368,7 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/reprlib.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
@@ -798,7 +804,6 @@
             "plistlib",
             "pprint",
             "profile",
-            "pydoc",
             "resource",
             "shell",
             "smtpd",
@@ -857,8 +862,6 @@
             "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
             "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
             "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
             "${libdir}/python${PYTHON_MAJMIN}/uuid.py"
         ],
         "cached": [
@@ -989,21 +992,6 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc"
         ]
     },
-    "pydoc": {
-        "summary": "Python interactive help support",
-        "rdepends": [
-            "core",
-            "netclient"
-        ],
-        "files": [
-            "${bindir}/pydoc*",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data"
-        ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc"
-        ]
-    },
     "resource": {
         "summary": "Python resource control interface",
         "rdepends": [
meta/recipes-devtools/python/python3_3.8.2.bb +1 -2
index a4a16fd495..36aa54ba6c 100644
@@ -318,7 +318,6 @@ RRECOMMENDS_${PN}-crypt_append_class-nativesdk = " openssl ca-certificates"
 FILES_${PN} = ""
 RPROVIDES_${PN}-modules = "${PN}"
 
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
 FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
 
 # provide python-pyvenv from python3-venv
@@ -332,7 +331,7 @@ INSANE_SKIP_${PN}-dev += "dev-elf"
 
 # catch all the rest (unsorted)
 PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pickle python3-audio"
 RDEPENDS_${PN}-modules_append_class-target = " python3-misc"
 RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc"
 FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"
Signature · 1 line
2.24.1
#1 lore raw

Hello Mingli,

Did you happen to run the create_manifest task after modifying the manifest to make sure that runtime dependencies are still valid?

Thanks

Alejandro

Quoted 122 lines · Mingli

From: Mingli Yu <[email protected]>

Add pydoc and urllib to core to fix below error:

  # python3
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_ import pydoc
ModuleNotFoundError: No module named 'pydoc'
File "/usr/lib64/python3.8/pydoc.py", line 72, in <module> import urllib.parse
ModuleNotFoundError: No module named 'urllib'

---
  .../python/python3/python3-manifest.json      | 24 +++++--------------
  meta/recipes-devtools/python/python3_3.8.2.bb |  3 +--
  2 files changed, 7 insertions(+), 20 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +6 -18
index 3bcc9b8662..808eadb8f6 100644
@@ -203,6 +203,7 @@
              "${bindir}/python${PYTHON_MAJMIN}",
              "${bindir}/python${PYTHON_MAJMIN}.real",
              "${bindir}/python3",
+            "${bindir}/pydoc*",
              "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h",
              "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
              "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
@@ -289,6 +290,7 @@
              "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
              "${libdir}/python${PYTHON_MAJMIN}/platform.py",
              "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
              "${libdir}/python${PYTHON_MAJMIN}/re.py",
              "${libdir}/python${PYTHON_MAJMIN}/reprlib.py",
              "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
@@ -313,8 +315,11 @@
              "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
              "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
              "${libdir}/python${PYTHON_MAJMIN}/types.py",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
              "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
              "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data",
              "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]"
          ],
          "cached": [
@@ -363,6 +368,7 @@
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/reprlib.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
@@ -798,7 +804,6 @@
              "plistlib",
              "pprint",
              "profile",
-            "pydoc",
              "resource",
              "shell",
              "smtpd",
@@ -857,8 +862,6 @@
              "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
              "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
              "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
              "${libdir}/python${PYTHON_MAJMIN}/uuid.py"
          ],
          "cached": [
@@ -989,21 +992,6 @@
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc"
          ]
      },
-    "pydoc": {
-        "summary": "Python interactive help support",
-        "rdepends": [
-            "core",
-            "netclient"
-        ],
-        "files": [
-            "${bindir}/pydoc*",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data"
-        ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc"
-        ]
-    },
      "resource": {
          "summary": "Python resource control interface",
          "rdepends": [
meta/recipes-devtools/python/python3_3.8.2.bb +1 -2
index a4a16fd495..36aa54ba6c 100644
@@ -318,7 +318,6 @@ RRECOMMENDS_${PN}-crypt_append_class-nativesdk = " openssl ca-certificates"
  FILES_${PN} = ""
  RPROVIDES_${PN}-modules = "${PN}"
 
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
  FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
 
  # provide python-pyvenv from python3-venv
@@ -332,7 +331,7 @@ INSANE_SKIP_${PN}-dev += "dev-elf"
 
  # catch all the rest (unsorted)
  PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pickle python3-audio"
  RDEPENDS_${PN}-modules_append_class-target = " python3-misc"
  RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc"
  FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"
author
#2 lore raw

Hi Alejandro,

Quoted 3 lines · Alejandro Hernandez Samaniego

Hello Mingli,

Did you happen to run the create_manifest task after modifying the manifest to make sure that runtime dependencies are still valid?

Yes, did run "bitbake python3 -c create_manifest" on my side and also did some adjustment after run create_manifest.

Thanks,

Quoted 129 lines

Thanks

Alejandro

Quoted 122 lines · Mingli

From: Mingli Yu<[email protected]>

Add pydoc and urllib to core to fix below error:

  # python3
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_ import pydoc
ModuleNotFoundError: No module named 'pydoc'
File "/usr/lib64/python3.8/pydoc.py", line 72, in <module> import urllib.parse
ModuleNotFoundError: No module named 'urllib'

---
  .../python/python3/python3-manifest.json      | 24 +++++--------------
  meta/recipes-devtools/python/python3_3.8.2.bb |  3 +--
  2 files changed, 7 insertions(+), 20 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +6 -18
index 3bcc9b8662..808eadb8f6 100644
@@ -203,6 +203,7 @@
              "${bindir}/python${PYTHON_MAJMIN}",
              "${bindir}/python${PYTHON_MAJMIN}.real",
              "${bindir}/python3",
+            "${bindir}/pydoc*",
              "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h",
              "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
              "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
@@ -289,6 +290,7 @@
              "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
              "${libdir}/python${PYTHON_MAJMIN}/platform.py",
              "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
              "${libdir}/python${PYTHON_MAJMIN}/re.py",
              "${libdir}/python${PYTHON_MAJMIN}/reprlib.py",
              "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
@@ -313,8 +315,11 @@
              "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
              "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
              "${libdir}/python${PYTHON_MAJMIN}/types.py",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
              "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
              "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data",
              "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]"
          ],
          "cached": [
@@ -363,6 +368,7 @@
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/reprlib.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
@@ -798,7 +804,6 @@
              "plistlib",
              "pprint",
              "profile",
-            "pydoc",
              "resource",
              "shell",
              "smtpd",
@@ -857,8 +862,6 @@
              "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
              "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
              "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
              "${libdir}/python${PYTHON_MAJMIN}/uuid.py"
          ],
          "cached": [
@@ -989,21 +992,6 @@
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc"
          ]
      },
-    "pydoc": {
-        "summary": "Python interactive help support",
-        "rdepends": [
-            "core",
-            "netclient"
-        ],
-        "files": [
-            "${bindir}/pydoc*",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data"
-        ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc"
-        ]
-    },
      "resource": {
          "summary": "Python resource control interface",
          "rdepends": [
meta/recipes-devtools/python/python3_3.8.2.bb +1 -2
index a4a16fd495..36aa54ba6c 100644
@@ -318,7 +318,6 @@ RRECOMMENDS_${PN}-crypt_append_class-nativesdk = " openssl ca-certificates"
  FILES_${PN} = ""
  RPROVIDES_${PN}-modules = "${PN}"
 
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
  FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
 
  # provide python-pyvenv from python3-venv
@@ -332,7 +331,7 @@ INSANE_SKIP_${PN}-dev += "dev-elf"
 
  # catch all the rest (unsorted)
  PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pickle python3-audio"
  RDEPENDS_${PN}-modules_append_class-target = " python3-misc"
  RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc"
  FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hello,

The more I look into this, the more I realize its incorrect.

Quoted 24 lines · Alejandro Hernandez

Hello Mingli,

Did you happen to run the create_manifest task after modifying the manifest to make sure that runtime dependencies are still valid?

Thanks

Alejandro

Quoted 13 lines · Mingli

From: Mingli Yu<[email protected]>

Add pydoc and urllib to core to fix below error:

  # python3
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_ import pydoc
ModuleNotFoundError: No module named 'pydoc'
File "/usr/lib64/python3.8/pydoc.py", line 72, in <module> import urllib.parse
ModuleNotFoundError: No module named 'urllib'

Why would pydoc be required to run python? or urllib in any case?

I believe there is a discrepancy between what python3-core does and what you believe it should do. python3-core is the smallest possible package to get a working python3 interpreter, if you install python3-core thats what you get, if you need more modules then you install more modules, e.g. python3-pydoc, python3-netlib, this way it allows us to keep installation size at minimum.

If what you want is to get a fully working python3 interpreter, without adding any new packages to the installation, then you need to install the python3 package (no core), this will in fact install python3-modules which contains all the modules, including python3-pydoc and python3-neclient which is the one that provides urllib.

Cheers,

Alejandro

Quoted 110 lines
Quoted 108 lines
---
  .../python/python3/python3-manifest.json      | 24 +++++--------------
  meta/recipes-devtools/python/python3_3.8.2.bb |  3 +--
  2 files changed, 7 insertions(+), 20 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +6 -18
index 3bcc9b8662..808eadb8f6 100644
@@ -203,6 +203,7 @@
              "${bindir}/python${PYTHON_MAJMIN}",
              "${bindir}/python${PYTHON_MAJMIN}.real",
              "${bindir}/python3",
+            "${bindir}/pydoc*",
              "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h",
              "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
              "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
@@ -289,6 +290,7 @@
              "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
              "${libdir}/python${PYTHON_MAJMIN}/platform.py",
              "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
              "${libdir}/python${PYTHON_MAJMIN}/re.py",
              "${libdir}/python${PYTHON_MAJMIN}/reprlib.py",
              "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
@@ -313,8 +315,11 @@
              "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
              "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
              "${libdir}/python${PYTHON_MAJMIN}/types.py",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
              "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
              "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data",
              "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]"
          ],
          "cached": [
@@ -363,6 +368,7 @@
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/reprlib.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
@@ -798,7 +804,6 @@
              "plistlib",
              "pprint",
              "profile",
-            "pydoc",
              "resource",
              "shell",
              "smtpd",
@@ -857,8 +862,6 @@
              "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
              "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
              "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
              "${libdir}/python${PYTHON_MAJMIN}/uuid.py"
          ],
          "cached": [
@@ -989,21 +992,6 @@
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc"
          ]
      },
-    "pydoc": {
-        "summary": "Python interactive help support",
-        "rdepends": [
-            "core",
-            "netclient"
-        ],
-        "files": [
-            "${bindir}/pydoc*",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data"
-        ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc"
-        ]
-    },
      "resource": {
          "summary": "Python resource control interface",
          "rdepends": [
meta/recipes-devtools/python/python3_3.8.2.bb +1 -2
index a4a16fd495..36aa54ba6c 100644
@@ -318,7 +318,6 @@ RRECOMMENDS_${PN}-crypt_append_class-nativesdk = " openssl ca-certificates"
  FILES_${PN} = ""
  RPROVIDES_${PN}-modules = "${PN}"
 
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
  FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
 
  # provide python-pyvenv from python3-venv
@@ -332,7 +331,7 @@ INSANE_SKIP_${PN}-dev += "dev-elf"
 
  # catch all the rest (unsorted)
  PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pickle python3-audio"
  RDEPENDS_${PN}-modules_append_class-target = " python3-misc"
  RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc"
  FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"
author
#5 lore raw

Hi Alejandro,

Quoted 3 lines · Alejandro Hernandez Samaniego

Hello,

The more I look into this, the more I realize its incorrect.

Understood your concern.

Quoted 28 lines · Alejandro Hernandez
Quoted 24 lines

Hello Mingli,

Did you happen to run the create_manifest task after modifying the manifest to make sure that runtime dependencies are still valid?

Thanks

Alejandro

Quoted 13 lines · Mingli

From: Mingli Yu<[email protected]>

Add pydoc and urllib to core to fix below error:

  # python3
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_ import pydoc
ModuleNotFoundError: No module named 'pydoc'
File "/usr/lib64/python3.8/pydoc.py", line 72, in <module> import urllib.parse
ModuleNotFoundError: No module named 'urllib'

Quoted 1 line

Why would pydoc be required to run python? or urllib in any case?

It's better make the python3-core more lightweight.

But in a system which didn't install other python modules but just python3-core, then we type help() as below and the help cannot show normally. So add the needed pydoc and urllib file to make the help() works.

 # python3
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_ import pydoc
ModuleNotFoundError: No module named 'pydoc'
File "/usr/lib64/python3.8/pydoc.py", line 72, in <module> import urllib.parse
ModuleNotFoundError: No module named 'urllib'

After pydoc and urllib added and also just install python3-core and no additional python3 modules installed.

# python3
Python 3.8.2 (default, May 18 2020, 07:15:10)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Welcome to Python 3.8's help utility!

If this is your first time using Python, you should definitely check out the tutorial on the Internet at https://docs.python.org/3.8/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", type "modules spam". help>

Thanks,

Quoted 123 lines

I believe there is a discrepancy between what python3-core does and what you believe it should do. python3-core is the smallest possible package to get a working python3 interpreter, if you install python3-core thats what you get, if you need more modules then you install more modules, e.g. python3-pydoc, python3-netlib, this way it allows us to keep installation size at minimum.

If what you want is to get a fully working python3 interpreter, without adding any new packages to the installation, then you need to install the python3 package (no core), this will in fact install python3-modules which contains all the modules, including python3-pydoc and python3-neclient which is the one that provides urllib.

Cheers,

Alejandro

Quoted 109 lines
Quoted 107 lines
---
  .../python/python3/python3-manifest.json      | 24 +++++--------------
  meta/recipes-devtools/python/python3_3.8.2.bb |  3 +--
  2 files changed, 7 insertions(+), 20 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +6 -18
index 3bcc9b8662..808eadb8f6 100644
@@ -203,6 +203,7 @@
              "${bindir}/python${PYTHON_MAJMIN}",
              "${bindir}/python${PYTHON_MAJMIN}.real",
              "${bindir}/python3",
+            "${bindir}/pydoc*",
              "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h",
              "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
              "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
@@ -289,6 +290,7 @@
              "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
              "${libdir}/python${PYTHON_MAJMIN}/platform.py",
              "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
              "${libdir}/python${PYTHON_MAJMIN}/re.py",
              "${libdir}/python${PYTHON_MAJMIN}/reprlib.py",
              "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
@@ -313,8 +315,11 @@
              "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
              "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
              "${libdir}/python${PYTHON_MAJMIN}/types.py",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
              "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
              "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data",
              "${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]"
          ],
          "cached": [
@@ -363,6 +368,7 @@
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/reprlib.*.pyc",
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
@@ -798,7 +804,6 @@
              "plistlib",
              "pprint",
              "profile",
-            "pydoc",
              "resource",
              "shell",
              "smtpd",
@@ -857,8 +862,6 @@
              "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
              "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
              "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
              "${libdir}/python${PYTHON_MAJMIN}/uuid.py"
          ],
          "cached": [
@@ -989,21 +992,6 @@
              "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc"
          ]
      },
-    "pydoc": {
-        "summary": "Python interactive help support",
-        "rdepends": [
-            "core",
-            "netclient"
-        ],
-        "files": [
-            "${bindir}/pydoc*",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data"
-        ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc"
-        ]
-    },
      "resource": {
          "summary": "Python resource control interface",
          "rdepends": [
meta/recipes-devtools/python/python3_3.8.2.bb +1 -2
index a4a16fd495..36aa54ba6c 100644
@@ -318,7 +318,6 @@ RRECOMMENDS_${PN}-crypt_append_class-nativesdk = " openssl ca-certificates"
  FILES_${PN} = ""
  RPROVIDES_${PN}-modules = "${PN}"
 
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
  FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
 
  # provide python-pyvenv from python3-venv
@@ -332,7 +331,7 @@ INSANE_SKIP_${PN}-dev += "dev-elf"
 
  # catch all the rest (unsorted)
  PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs python3-pickle python3-audio"
  RDEPENDS_${PN}-modules_append_class-target = " python3-misc"
  RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc"
  FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"
#6 lore raw

Hey Mingly Yu,

Quoted 73 lines · Mingli

Hi Alejandro,

Quoted 3 lines · Alejandro Hernandez Samaniego

Hello,

The more I look into this, the more I realize its incorrect.

Understood your concern.

Quoted 28 lines · Alejandro Hernandez
Quoted 24 lines

Hello Mingli,

Did you happen to run the create_manifest task after modifying the manifest to make sure that runtime dependencies are still valid?

Thanks

Alejandro

Quoted 13 lines · Mingli

From: Mingli Yu<[email protected]>

Add pydoc and urllib to core to fix below error:

  # python3
  >>> help()
  Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_
  import pydoc
  ModuleNotFoundError: No module named 'pydoc'
  File "/usr/lib64/python3.8/pydoc.py", line 72, in <module>
  import urllib.parse
  ModuleNotFoundError: No module named 'urllib'
Quoted 1 line

Why would pydoc be required to run python? or urllib in any case?

It's better make the python3-core more lightweight.

But in a system which didn't install other python modules but just python3-core, then we type help() as below and the help cannot show normally. So add the needed pydoc and urllib file to make the help() works.

 # python3
 >>> help()
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_
 import pydoc
 ModuleNotFoundError: No module named 'pydoc'
 File "/usr/lib64/python3.8/pydoc.py", line 72, in <module>
 import urllib.parse
 ModuleNotFoundError: No module named 'urllib'

After pydoc and urllib added and also just install python3-core and no additional python3 modules installed.

# python3
Python 3.8.2 (default, May 18 2020, 07:15:10)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Welcome to Python 3.8's help utility!

If this is your first time using Python, you should definitely check out the tutorial on the Internet at https://docs.python.org/3.8/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules.  To quit this help utility and return to the interpreter, just type "quit".

Quoted 9 lines

To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics".  Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", type "modules spam". help>

Thanks,

I still believe python3-core should be left as small as possible, the use case of an embedded device calling help() is probably seldom, IMO that fits more in the workflow of installing the netlib and pydoc modules for that specific usecase.

It also looks like simply installing python3-pydoc would do what you want, since the error to load urllib is coming out of loading pydoc itself and the manifest does specify the dependency from pydoc to netclient.

Cheers,

Alejandro

Quoted 126 lines
Quoted 124 lines

I believe there is a discrepancy between what python3-core does and what you believe it should do. python3-core is the smallest possible package to get a working python3 interpreter, if you install python3-core thats what you get, if you need more modules then you install more modules, e.g. python3-pydoc, python3-netlib, this way it allows us to keep installation size at minimum.

If what you want is to get a fully working python3 interpreter, without adding any new packages to the installation, then you need to install the python3 package (no core), this will in fact install python3-modules which contains all the modules, including python3-pydoc and python3-neclient which is the one that provides urllib.

Cheers,

Alejandro

Quoted 110 lines
Quoted 108 lines

---
  .../python/python3/python3-manifest.json      | 24
+++++--------------
  meta/recipes-devtools/python/python3_3.8.2.bb |  3 +--

  2 files changed, 7 insertions(+), 20 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +5 -0
index 3bcc9b8662..808eadb8f6 100644
@@ -203,6 +203,7 @@
               "${bindir}/python${PYTHON_MAJMIN}",
               "${bindir}/python${PYTHON_MAJMIN}.real",
               "${bindir}/python3",
+            "${bindir}/pydoc*",
 "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h",
 "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
 "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
@@ -289,6 +290,7 @@
               "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
 "${libdir}/python${PYTHON_MAJMIN}/platform.py",
 "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
               "${libdir}/python${PYTHON_MAJMIN}/re.py",
               "${libdir}/python${PYTHON_MAJMIN}/reprlib.py",
 "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
@@ -313,8 +315,11 @@
 "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
 "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
               "${libdir}/python${PYTHON_MAJMIN}/types.py",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib",
+ "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
 "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
               "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data",

"${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]" ],
          "cached": [

meta/recipes-devtools/python/python3/python3-manifest.json +1 -3
@@ -363,6 +368,7 @@
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/reprlib.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
@@ -798,7 +804,6 @@
               "plistlib",
               "pprint",
               "profile",
-            "pydoc",
               "resource",
               "shell",
               "smtpd",
@@ -857,8 +862,6 @@
               "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
               "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
 "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib",
- "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",

              "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ],
          "cached": [

meta/recipes-devtools/python/python3/python3-manifest.json +0 -0
@@ -989,21 +992,6 @@

"${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" ]
      },
-    "pydoc": {
-        "summary": "Python interactive help support", -        "rdepends": [
-            "core",
-            "netclient"
-        ],
-        "files": [
-            "${bindir}/pydoc*",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py", -            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data" -        ],
-        "cached": [
- "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc" -        ]
-    },
      "resource": {
          "summary": "Python resource control interface", "rdepends": [

meta/recipes-devtools/python/python3_3.8.2.bb +0 -0
index a4a16fd495..36aa54ba6c 100644
@@ -318,7 +318,6 @@ RRECOMMENDS_${PN}-crypt_append_class-nativesdk 

= " openssl ca-certificates"
  FILES_${PN} = ""
  RPROVIDES_${PN}-modules = "${PN}"
  -FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3" FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"

    # provide python-pyvenv from python3-venv
meta/recipes-devtools/python/python3_3.8.2.bb +0 -0
@@ -332,7 +331,7 @@ INSANE_SKIP_${PN}-dev += "dev-elf"
     # catch all the rest (unsorted)

  PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs
python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs
python3-pickle python3-audio"
  RDEPENDS_${PN}-modules_append_class-target = " python3-misc" RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc"
  FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"

author
#7 lore raw

Hi Alejandro,

Quoted 83 lines · Alejandro Hernandez Samaniego

Hey Mingly Yu,

Quoted 80 lines · Mingli

Hi Alejandro,

Quoted 3 lines · Alejandro Hernandez Samaniego

Hello,

The more I look into this, the more I realize its incorrect.

Understood your concern.

Quoted 28 lines · Alejandro Hernandez
Quoted 24 lines

Hello Mingli,

Did you happen to run the create_manifest task after modifying the manifest to make sure that runtime dependencies are still valid?

Thanks

Alejandro

Quoted 13 lines · Mingli

From: Mingli Yu<[email protected]>

Add pydoc and urllib to core to fix below error:

  # python3
  >>> help()
  Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_
  import pydoc
  ModuleNotFoundError: No module named 'pydoc'
  File "/usr/lib64/python3.8/pydoc.py", line 72, in <module>
  import urllib.parse
  ModuleNotFoundError: No module named 'urllib'
Quoted 1 line

Why would pydoc be required to run python? or urllib in any case?

It's better make the python3-core more lightweight.

But in a system which didn't install other python modules but just python3-core, then we type help() as below and the help cannot show normally. So add the needed pydoc and urllib file to make the help() works.

 # python3
 >>> help()
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib64/python3.8/sitebuiltins.py", line 102, in __call_
 import pydoc
 ModuleNotFoundError: No module named 'pydoc'
 File "/usr/lib64/python3.8/pydoc.py", line 72, in <module>
 import urllib.parse
 ModuleNotFoundError: No module named 'urllib'

After pydoc and urllib added and also just install python3-core and no additional python3 modules installed.

# python3
Python 3.8.2 (default, May 18 2020, 07:15:10)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Quoted 1 line
Quoted 1 line
Quoted 1 line

help()

Welcome to Python 3.8's help utility!

If this is your first time using Python, you should definitely check out the tutorial on the Internet at https://docs.python.org/3.8/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules.  To quit this help utility and return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics".  Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", type "modules spam". help>

Quoted 7 lines
Quoted 2 lines

Thanks,

I still believe python3-core should be left as small as possible, the use case of an embedded device calling help() is probably seldom, IMO that fits more in the workflow of installing the netlib and pydoc modules for that specific usecase.

It also looks like simply installing python3-pydoc would do what you want, since

Install python3-pydoc indeed solves the problem, but does it mean python3-core depends on python3-pydoc?

Though the use case to type help() is seldom, but help() is much useful and I just add as less as possible files to let help() works.(add urllib files in as pydoc depends on it).

Thanks,

Quoted 134 lines

the error to load urllib is coming out of loading pydoc itself and the manifest does specify the dependency from pydoc to netclient.

Cheers,

Alejandro

Quoted 126 lines
Quoted 124 lines

I believe there is a discrepancy between what python3-core does and what you believe it should do. python3-core is the smallest possible package to get a working python3 interpreter, if you install python3-core thats what you get, if you need more modules then you install more modules, e.g. python3-pydoc, python3-netlib, this way it allows us to keep installation size at minimum.

If what you want is to get a fully working python3 interpreter, without adding any new packages to the installation, then you need to install the python3 package (no core), this will in fact install python3-modules which contains all the modules, including python3-pydoc and python3-neclient which is the one that provides urllib.

Cheers,

Alejandro

Quoted 110 lines
Quoted 108 lines

---
  .../python/python3/python3-manifest.json      | 24
+++++--------------
  meta/recipes-devtools/python/python3_3.8.2.bb |  3 +--

  2 files changed, 7 insertions(+), 20 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +5 -0
index 3bcc9b8662..808eadb8f6 100644
@@ -203,6 +203,7 @@
               "${bindir}/python${PYTHON_MAJMIN}",
               "${bindir}/python${PYTHON_MAJMIN}.real",
               "${bindir}/python3",
+            "${bindir}/pydoc*",
 "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h",
 "${libdir}/python${PYTHON_MAJMIN}/UserDict.py",
 "${libdir}/python${PYTHON_MAJMIN}/UserList.py",
@@ -289,6 +290,7 @@
               "${libdir}/python${PYTHON_MAJMIN}/pkgutil.py",
 "${libdir}/python${PYTHON_MAJMIN}/platform.py",
 "${libdir}/python${PYTHON_MAJMIN}/posixpath.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py",
               "${libdir}/python${PYTHON_MAJMIN}/re.py",
               "${libdir}/python${PYTHON_MAJMIN}/reprlib.py",
 "${libdir}/python${PYTHON_MAJMIN}/rlcompleter.py",
@@ -313,8 +315,11 @@
 "${libdir}/python${PYTHON_MAJMIN}/tokenize.py",
 "${libdir}/python${PYTHON_MAJMIN}/traceback.py",
               "${libdir}/python${PYTHON_MAJMIN}/types.py",
+            "${libdir}/python${PYTHON_MAJMIN}/urllib",
+ "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",
 "${libdir}/python${PYTHON_MAJMIN}/warnings.py",
               "${libdir}/python${PYTHON_MAJMIN}/weakref.py",
+            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data",

"${prefix}/lib/python${PYTHON_MAJMIN}/config*/*[!.a]" ],
          "cached": [

meta/recipes-devtools/python/python3/python3-manifest.json +1 -3
@@ -363,6 +368,7 @@
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pkgutil.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/platform.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/posixpath.*.pyc",
+ "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/re.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/reprlib.*.pyc",
 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/rlcompleter.*.pyc",
@@ -798,7 +804,6 @@
               "plistlib",
               "pprint",
               "profile",
-            "pydoc",
               "resource",
               "shell",
               "smtpd",
@@ -857,8 +862,6 @@
               "${libdir}/python${PYTHON_MAJMIN}/poplib.py",
               "${libdir}/python${PYTHON_MAJMIN}/smtplib.py",
 "${libdir}/python${PYTHON_MAJMIN}/telnetlib.py",
-            "${libdir}/python${PYTHON_MAJMIN}/urllib",
- "${libdir}/python${PYTHON_MAJMIN}/urllib/__pycache__",

              "${libdir}/python${PYTHON_MAJMIN}/uuid.py" ],
          "cached": [

meta/recipes-devtools/python/python3/python3-manifest.json +0 -0
@@ -989,21 +992,6 @@

"${libdir}/python${PYTHON_MAJMIN}/__pycache__/pstats.*.pyc" ]
      },
-    "pydoc": {
-        "summary": "Python interactive help support", -        "rdepends": [
-            "core",
-            "netclient"
-        ],
-        "files": [
-            "${bindir}/pydoc*",
-            "${libdir}/python${PYTHON_MAJMIN}/pydoc.py", -            "${libdir}/python${PYTHON_MAJMIN}/pydoc_data" -        ],
-        "cached": [
- "${libdir}/python${PYTHON_MAJMIN}/__pycache__/pydoc.*.pyc" -        ]
-    },
      "resource": {
          "summary": "Python resource control interface", "rdepends": [

meta/recipes-devtools/python/python3_3.8.2.bb +0 -0
index a4a16fd495..36aa54ba6c 100644
@@ -318,7 +318,6 @@ RRECOMMENDS_${PN}-crypt_append_class-nativesdk 

= " openssl ca-certificates"
  FILES_${PN} = ""
  RPROVIDES_${PN}-modules = "${PN}"
  -FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3" FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"

    # provide python-pyvenv from python3-venv
meta/recipes-devtools/python/python3_3.8.2.bb +0 -0
@@ -332,7 +331,7 @@ INSANE_SKIP_${PN}-dev += "dev-elf"
     # catch all the rest (unsorted)

  PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs
python3-pydoc python3-pickle python3-audio"
+RDEPENDS_${PN}-misc += "python3-core python3-email python3-codecs
python3-pickle python3-audio"
  RDEPENDS_${PN}-modules_append_class-target = " python3-misc" RDEPENDS_${PN}-modules_append_class-nativesdk = " python3-misc"
  FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload"

#8 lore raw
In reply to Alejandro Hernandez
Quoted 12 lines · Alejandro Hernandez

I still believe python3-core should be left as small as possible, the use case
of an embedded device calling help() is probably seldom, IMO that fits more in
the workflow of installing the netlib and pydoc modules for that specific usecase.
It also looks like simply installing python3-pydoc would do what you want, since
the error to load urllib is coming out of loading pydoc itself and the manifest
does specify the dependency from pydoc to netclient.

I have to agree with Alejandro here, whilst help() not working is not ideal, we are targetting "embedded" systems where something like this is not unreasonable for the size gain.

Does anyone have any size information about the implications of this? I'd guess there could be quite a chain of modules that could end up installed with this change.

If you don't like the import error, we could just patch it to say "Sorry, pydoc not installed".

Cheers,

Richard